package com.jiangyao.common.configs;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MybatisPlusConfig {

	@Bean
	public PaginationInterceptor paginationInterceptor() {
		PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
		paginationInterceptor.setLimit(-1);
		return paginationInterceptor;
	}

	/**
	 * 数据自动填充处理类
	 *
	 * @return 数据自动填充处理类
	 */
	@Bean
	public MyMetaObjectHandler metaObjectHandler() {
		return new MyMetaObjectHandler();
	}

}
